{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fnil\fcharset77 Monaco;
}
{\colortbl;\red255\green255\blue255;\red191\green0\blue0;\red0\green0\blue191;\red96\green96\blue96;
\red0\green115\blue0;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs24 \cf0 \

\f1\b\fs36 AmplitudeMod		amplitude follower\

\fs24 \
AmplitudeMod.kr(input, attackTime, releaseTime, mul, add)\

\f0\b0 \
Tracks the peak amplitude of a signal.\
As a opposed to [
\f1\b Amplitude
\f0\b0 ], AmplitudeMod, allows attack and release times to be modulated once the UGen has been instantiated. There is a tiny overhead associated to this.\
\

\f1\b input
\f0\b0  - input signal.\

\f1\b attackTime
\f0\b0  - 60dB convergence time for following attacks.\

\f1\b releaseTime
\f0\b0  - 60dB convergence time for following decays.\
\

\f2\fs18 (\
\cf2 // use input amplitude to control Pulse amplitude - use headphones to prevent feedback.\
\cf3 SynthDef\cf0 (\cf4 "help-AmplitudeMod"\cf0 ,\{ \cf3 arg\cf0  out=0;\
	\cf3 Out\cf0 .ar(out,\
		\cf3 Pulse\cf0 .ar(90, 0.3, \cf3 Amplitude\cf0 .kr(\cf3 AudioIn\cf0 .ar(1)))\
	)\
\}).play;\
\
)\
\
\
(\
\cf2 // use input amplitude to control SinOsc frequency - use headphones to prevent feedback.\cf0 \
z = \cf3 SynthDef\cf0 (\cf4 "help-AmplitudeMod"\cf0 ,\{ \cf3 arg\cf0  out=0, attack=0.01, release=0.01;\
	\cf3 Out\cf0 .ar(out,\
		\cf3 SinOsc\cf0 .ar(\
			\cf3 AmplitudeMod\cf0 .kr(\
						\cf3 AudioIn\cf0 .ar(1),\
						attack,\
						release,\
						1200,\
						400)\
			, 0, 0.3)\
	)\
\}).play;\
\
)\
z.set(\cf5 \\attack\cf0 , 0.050)\
z.set(\cf5 \\release\cf0 , 0.125)\
\
z.free\

\fs24 \
}